package com.huilian.iotbox.admin.wap.service.impl;

import com.huilian.iotbox.admin.wap.dao.UserPermissionDao;
import com.huilian.iotbox.admin.wap.service.UserPermissionService;
import com.huilian.iotbox.data.po.UserPermission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserPermissionServiceImpl implements UserPermissionService {

    @Autowired
    private UserPermissionDao userPermissionDao;

    @Override
    public List<UserPermission> findAllByUserId(Integer userId) {
        return userPermissionDao.findAllByUserId(userId);
    }

    @Override
    public void batchInsert(List<UserPermission> addUserPermissionList) {
        userPermissionDao.batchInsert(addUserPermissionList);
    }

    @Override
    public void batchDelete(List<UserPermission> delUserPermissionList) {
        userPermissionDao.batchDelete(delUserPermissionList);
    }
}
